{{ define "main" }}
  <div class="posts archive">
    {{ partial "breadcrumb.html" . }}
    
    <h1 class="post-title">{{.Title}}</h1>
    <div id="all-tags">
      {{- range $name, $taxonomy := .Site.Taxonomies.tags -}}
      <a href="/tags/{{ $name | urlize }}">#{{ $name }}<small>({{ .Count }})</small></a>
      {{- end -}}
    </div>

    {{- range  (where (where .Pages "Type" "in" (slice "post" "posts")) "Kind" "page").GroupByDate "2006" }}
    <div class="post archive__group-posts ">
        {{- range .Pages.GroupByDate "2006-01" }}
        <div class="archive__group-month">
          <h3>{{ .Key }}</h3>
          <div class="archive__post">
          {{- range .Pages }}
          <div class="archive__post-title">
            <a href="{{.Permalink}}">{{.Title}}<span class="post-date">{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}</span></a>
          </div>
          {{ end }}
          </div>
        </div>
        {{- end }}
    </div>
    {{- end }}
  </div><!--posts-group end-->
{{ end }}
